package com.yykj.hospital.server.service.account.impl;

import com.yykj.hospital.server.model.entity.account.AccountLogIcon;
import com.yykj.hospital.server.model.repository.account.AccountLogIconRepository;
import com.yykj.hospital.server.service.account.AccountLogIconService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class AccountLogIconServiceImpl implements AccountLogIconService {

    @Override
    public Map<String, AccountLogIcon> listAccountLogIcon() {
        List<AccountLogIcon> list =  accountLogIconRepository.findAll();
        Map<String, AccountLogIcon> map = new HashMap<>();
        for (AccountLogIcon icon:list){
            map.put(icon.getId(),icon);
        }
        return map;
    }

    private AccountLogIconRepository accountLogIconRepository;

    @Autowired
    public void setAccountLogIconRepository(AccountLogIconRepository accountLogIconRepository) {
        this.accountLogIconRepository = accountLogIconRepository;
    }
}
